package com.canal.display.entity.canal;

import lombok.Getter;
import lombok.Setter;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;

import java.util.Collection;
import java.util.Date;

/**
 * 渠道信息
 * @author yangbo
 * @date 2020-06-23 13:54
 */
@Getter
@Setter
public class ZcolChannel implements UserDetails {

    /** id */
    private Integer id;

    /** 渠道名称 */
    private String name;

    /** 渠道上用户名 */
    private String buzName;

    /** 渠道商密码 */
    private String buzPassword;

    /** 创建时间 */
    private Date createdAt;

    @Override
    public Collection<? extends GrantedAuthority> getAuthorities() {
        return null;
    }

    @Override
    public String getPassword() {
        return buzPassword;
    }

    @Override
    public String getUsername() {
        return buzName;
    }

    @Override
    public boolean isAccountNonExpired() {
        return true;
    }

    @Override
    public boolean isAccountNonLocked() {
        return true;
    }

    @Override
    public boolean isCredentialsNonExpired() {
        return true;
    }

    @Override
    public boolean isEnabled() {
        return true;
    }
}
